﻿using Newtonsoft.Json;
using ThresholdAssistant.Enums;
using System;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.DataContract.Param
{
    /// <summary>
    /// 指令推送请求参数
    /// </summary>
    [Serializable]
    public class CmdPushParam
    {
        /// <summary>
        /// 机器人推送指令类型
        /// </summary>
        [JsonProperty("JpushType"), JsonPropertyName("JpushType")]
        public int Type { get; set; }

        /// <summary>
        /// 业务流水号
        /// </summary>
        [JsonProperty("vcSerialNo"), JsonPropertyName("vcSerialNo")]
        public string SerialNo { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        [JsonProperty("vcDeviceNo"), JsonPropertyName("vcDeviceNo")]
        public string DeviceNo { get; set; }

        /// <summary>
        /// 商户号
        /// </summary>
        [JsonProperty("vcMerchantNo"), JsonPropertyName("vcMerchantNo")]
        public string MerchantNo { get; set; }

        /// <summary>
        /// 机器人Id
        /// </summary>
        [JsonProperty("vcRobotWxId"), JsonPropertyName("vcRobotWxId")]
        public string RobotWxId { get; set; }

        /// <summary>
        /// 机器人编号
        /// </summary>
        [JsonProperty("vcRobotSerialNo"), JsonPropertyName("vcRobotSerialNo")]
        public string RobotSerialNo { get; set; }

        /// <summary>
        /// 群Id
        /// </summary>
        [JsonProperty("vcChatRoomId"), JsonPropertyName("vcChatRoomId")]
        public string ChatRoomId { get; set; }

        /// <summary>
        /// 指令Json参数
        /// </summary>
        [JsonProperty("vcJson"), JsonPropertyName("vcJson")]
        public object Data { get; set; }

        /// <summary>
        /// 商户回调地址
        /// </summary>
        [JsonProperty("vcNotifyUrl"), JsonPropertyName("vcNotifyUrl")]
        public string NotifyUrl { get; set; }

        /// <summary>
        /// 密钥
        /// </summary>
        [JsonProperty("vcSecret"), JsonPropertyName("vcSecret")]
        public string Secret { get; set; }

        /// <summary>
        /// 错误码
        /// </summary>
        [JsonProperty("nResult"), JsonPropertyName("nResult")]
        public string Code { get; set; } = "1";

        /// <summary>
        /// 错误消息
        /// </summary>
        [JsonProperty("vcResult"), JsonPropertyName("vcResult")]
        public string Message { get; set; } = "Success";

        /// <summary>
        /// 机器人类型
        /// </summary>
        [JsonProperty("nRobotType"), JsonPropertyName("nRobotType")]
        public int RobotType { get; set; }

        /// <summary>
        /// 当前推送的机器人redis类型
        /// </summary>
        [JsonProperty("nPushTargetType"), JsonPropertyName("nPushTargetType")]
        public RobotPushTargetType PushTargetType { get; set; }

        /// <summary>
        /// 透传商家参数
        /// </summary> 
        [JsonProperty("transParam"), JsonPropertyName("transParam")]
        public string TransParam { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("nCmdType"), JsonPropertyName("nCmdType")]
        public CmdType CmdType { get; set; } = CmdType.GetContentAndExecution;

        /// <summary>
        /// 当前回调内容时间戳
        /// </summary>
        [JsonProperty("nTimeStamp"), JsonPropertyName("nTimeStamp")]
        public long TimeStamp { get; set; }
    }
}